package gjtx7;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;

public class Lottery {
    public static void main(String[] args) {
        List<Integer> list=new LinkedList<>();
        Random r=new Random();
        //随机抽取六个不重复的红球；
        for (int i=1; i<=6;){
            int k=r.nextInt(33)+1;
            if (list.contains(k)){
                continue;
            }
            list.add(k);
            i++;
        }
        //从小到大排序
        Collections.sort(list);
        //随机抽取一个蓝球；
        int j=r.nextInt(16)+1;
        list.add(j);
        for (int s:list)
            System.out.print(s+"\t");

    }
}
